//
//  ZJEdieMessageController.m
//  ZiJinLian
//
//  Created by lc on 2017/3/24.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "ZJEditMessageController.h"

@interface ZJEditMessageController ()<UITableViewDelegate,UITableViewDataSource>

@end

NSString* const HEAD_CELL=@"headCell";
NSString* const SEX_CELL=@"sexCell";
NSString* const NICK_CELL=@"nickCell";
NSString* const PHONE_CELL=@"phoneCell";

@implementation ZJEditMessageController

-(void)createView{
    [self initTitle:MyString(@"编辑资料")];
    [ZJNavTool rightItemOnNavigationItem:self target:self action:@selector(rightClick) andType:item_edit];
    _tableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 0, MainW, MainH-64) style:UITableViewStyleGrouped];
    _tableView.delegate=self;
    _tableView.dataSource=self;
    _tableView.separatorColor=SeparatorColor;
    _tableView.separatorInset=UIEdgeInsetsZero;
    _tableView.separatorInset=UIEdgeInsetsMake(0, 0, 0, 0);
    
}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{

    return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return 5;
}


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    
    switch (indexPath.row) {
        case 0:
            
            break;
        case 1:
            
            break;
        case 2:
            
            break;
            
        case 3:
            
            break;
        case 4:
            
            break;
        case 5:
            
            break;
        default:
            break;
    }
    return nil;
}




#pragma mark 右侧点击
-(void)rightClick{
    UIButton* btn=((UIButton*)self.navigationItem.rightBarButtonItem.customView);
    NSString* str= btn.titleLabel.text;
    if ([str isEqualToString:MyString(@"保存")]) {
      //保存操作
      //箭头显示
        
    }else if([str isEqualToString:MyString(@"编辑")]){
    
        [btn setTitle:MyString(@"保存") forState:UIControlStateNormal];
        //箭头隐藏
    }
}


@end
